home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / PHANTOM2.ZIP / PHANTOM2.DOC < prev    next >
Text File  |  1991-05-19  |  53KB  |  1,567 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.                                     PHANTOM2
  16.  
  17.                          The Phantom of the Keyboard II
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.                                  P2 Enterprises
  38.                                   P.O. Box 25
  39.                               Ben Lomond, CA 95005
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.                                  Phantom2 V1.1
  54.             Copyright (c) 1991 P2 Enterprises   All Rights Reserved
  55.  
  56.  
  57.  
  58.                                     - 1 -
  59.     PHANTOM V1.1                                                    Page 2
  60.                                                              14 January 91
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.                                        CONTENTS
  74.  
  75.  
  76.  
  77.     CHAPTER 1       INTRODUCTION
  78.  
  79.             1.1     WHAT IS THE PHANTOM OF THE KEYBOARD II?  . . . . . 1-1
  80.             1.2     WHAT IS PHANTOM2 GOOD FOR? . . . . . . . . . . . . 1-1
  81.  
  82.  
  83.     CHAPTER 2       DIFFERENCES BETWEEN PHANTOM V1.0 AND PHANTOM2
  84.  
  85.  
  86.     CHAPTER 3       USING PHANTOM2
  87.  
  88.             3.1     PHANTOM2'S COMMAND LINE  . . . . . . . . . . . . . 3-1
  89.             3.2     RECORDING AND PLAYING BACK . . . . . . . . . . . . 3-2
  90.             3.3     PAUSING  . . . . . . . . . . . . . . . . . . . . . 3-3
  91.             3.4     QUICK PLAYBACK . . . . . . . . . . . . . . . . . . 3-3
  92.             3.5     LOOPING PLAYBACK . . . . . . . . . . . . . . . . . 3-3
  93.             3.6     THE PHANTOM2 CONTROL PANEL . . . . . . . . . . . . 3-4
  94.             3.7     CHANGING THE HOT KEY . . . . . . . . . . . . . . . 3-5
  95.             3.8     MAKING PHANTOM2 MEMORY RESIDENT  . . . . . . . . . 3-5
  96.             3.9     REMOVING PHANTOM2 FROM MEMORY  . . . . . . . . . . 3-6
  97.             3.10    EDITING PHANTOM2 RECORDINGS  . . . . . . . . . . . 3-6
  98.             3.10.1    PROGRAMMED PAUSES  . . . . . . . . . . . . . . . 3-9
  99.             3.10.2    SUBSTITUTION PARAMETERS  . . . . . . . . . . . . 3-9
  100.             3.10.3    COMPRESSED MODE  . . . . . . . . . . . . . . .  3-10
  101.             3.10.4    POP-UP DISPLAYS  . . . . . . . . . . . . . . .  3-10
  102.             3.10.5    LABELS AND THE $GOTO DIRECTIVE . . . . . . . .  3-12
  103.             3.10.6    POP-UP MENUS . . . . . . . . . . . . . . . . .  3-13
  104.             3.10.7    ELIMINATING HELP TEXT  . . . . . . . . . . . .  3-15
  105.             3.11    PASSING PARAMETERS TO RECORDINGS ON THE COMMAND 
  106.                     LINE . . . . . . . . . . . . . . . . . . . . . .  3-16
  107.             3.12    WHAT'S BAD ABOUT PHANTOM2? . . . . . . . . . . .  3-16
  108.  
  109.  
  110.     CHAPTER 4       PHANTOM2 TECHNICAL INFORMATION
  111.  
  112.             4.1     DOS VERSION REQUIREMENTS . . . . . . . . . . . . . 4-1
  113.             4.2     CALLING PHANTOM2 FROM A USER PROGRAM . . . . . . . 4-1
  114.  
  115.  
  116.                                     - 2 -
  117.     PHANTOM V1.1                                                    Page 3
  118.                                                              14 January 91
  119.  
  120.  
  121.             4.3     HOW DOES IT WORK?  . . . . . . . . . . . . . . . . 4-2
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.                                     - 3 -
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.                                   CHAPTER 1
  188.  
  189.                                  INTRODUCTION
  190.  
  191.  
  192.  
  193.     1.1  WHAT IS THE PHANTOM OF THE KEYBOARD II?
  194.  
  195.     Phantom2 is a shareware keystroke recorder for MS-DOS.
  196.  
  197.     In record mode, Phantom2 records every key pressed on  your  keyboard,
  198.     whether you are at the DOS command prompt or running a program.  Then,
  199.     in playback mode, Phantom2 plays back the recorded keystrokes  exactly
  200.     as they were originally recorded, with exactly the same timing as when
  201.     they were recorded.
  202.  
  203.  
  204.  
  205.     1.2  WHAT IS PHANTOM2 GOOD FOR?
  206.  
  207.  
  208.           o  Recovery After System Crashes or Power Failures
  209.  
  210.              Because Phantom2 writes your recorded keystrokes to the  disk
  211.              after  every  32  keystrokes, if you were recording when your
  212.              system failed, you can  just  playback  the  recording  file,
  213.              recovering  everything except perhaps the last 31 keystrokes.
  214.              This can be tremendously useful during long editing sessions,
  215.              eliminating  the need to periodically save your work to avoid
  216.              losing it in a system crash.
  217.  
  218.           o  A Batch Substitute
  219.  
  220.              Phantom2  can  be  used  in  place  of  simple  batch  files,
  221.              eliminating  the  need  to  prepare  the  batch files with an
  222.              editor -- You just show Phantom2  what  you  want  done,  and
  223.              Phantom2  can  do  it  for you after that.  You can even edit
  224.              your Phantom2 recordings if you make  a  mistake  during  the
  225.              recording.   You  can  also  perform  parameter  substitution
  226.              similar to that available with MS-DOS batch files.
  227.  
  228.  
  229.  
  230.  
  231.  
  232.                                     - 4 -
  233.     INTRODUCTION                                                  Page 1-2
  234.     WHAT IS PHANTOM2 GOOD FOR?                               14 January 91
  235.  
  236.  
  237.           o  Program Startup
  238.  
  239.              Phantom2  can  be  used  to  automatically  supply  input  to
  240.              programs  which  expect  to  receive keyboard input (programs
  241.              such as spreadsheets and others).  It can  thus  be  used  to
  242.              perform  a  sequence  of  "startup"  commands which you would
  243.              otherwise have to type each time you run the program.
  244.  
  245.           o  Automatic Execution
  246.  
  247.              You might record the keystrokes to run your spreadsheet, load
  248.              current stock quotes, print a graph, and exit.  You only have
  249.              to do it once; Phantom2 can do it after that.
  250.  
  251.              Phantom2 can be used to automate access to  systems  such  as
  252.              Prodigy which normally require your presence at the keyboard.
  253.              Record the keystrokes that you use to dial Prodigy and  print
  254.              headline  news  and current stock quotations.  Then have your
  255.              computer wake up early and call Prodigy.  You  can  have  the
  256.              latest information printed and waiting for you to peruse with
  257.              your morning coffee.  All you need is a timer to turn on your
  258.              PC   early   in  the  morning  and  an  extra  line  in  your
  259.              AUTOEXEC.BAT file to run Phantom2.
  260.  
  261.           o  Demos
  262.  
  263.              Phantom2 can be  used  create  a  quick  demonstration  of  a
  264.              program which can then be played back at will for prospective
  265.              users or customers.  Phantom2 can be paused automatically  or
  266.              manually  during  playback  for discussion or manual entry of
  267.              data to the program being demonstrated.  In addition,  pop-up
  268.              windows  can be displayed to explain what is happening in the
  269.              demo, and menus can be presented to allow the user  to  guide
  270.              the course of the demo.
  271.  
  272.              Automatic timeouts when  user  response  is  required  and  a
  273.              looping   feature   allow   Phantom2-based   demos   to   run
  274.              continuously and unattended and yet allow users  to  interact
  275.              with the demonstration if they wish.
  276.  
  277.           o  Software Testing
  278.  
  279.              Phantom2 can be used to record tests  of  software  which  is
  280.              undergoing  revision.   Then,  the tests can be run after the
  281.              revisions are complete to be  sure  what  worked  before  the
  282.              revisions still works after the revisions.
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.                                     - 5 -
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.                                   CHAPTER 2
  304.  
  305.                 DIFFERENCES BETWEEN PHANTOM V1.0 AND PHANTOM2
  306.  
  307.  
  308.  
  309.  
  310.           o  Quick Playback
  311.  
  312.              Phantom2 allows you to play back recordings  with  no  delays
  313.              between the recorded keystrokes.  This can speed execution of
  314.              Phantom2 recordings  when  the  programs  being  run  do  not
  315.              require paced input.
  316.  
  317.              You select quick playback by using the /Q switch  instead  of
  318.              the /P switch on the Phantom2 command line.
  319.  
  320.           o  Pause and Resume
  321.  
  322.              Phantom2  allows  you  to  pause  and  resume  recording  and
  323.              playback.   The  period  of  time  paused  in not included in
  324.              Phantom2's recording.  While Phantom2 is paused, you may type
  325.              at  the  keyboard just as if Phantom2 were not present.  When
  326.              recording or playback is resumed, Phantom2 picks up where  it
  327.              left off.
  328.  
  329.              You can introduce automatic pauses during playback by editing
  330.              the recording file to insert pause requests wherever desired.
  331.  
  332.           o  Looping Playback
  333.  
  334.              You  can  cause  Phantom2  to  restart  a  playback   session
  335.              automatically  when the end of the recording file is reached.
  336.              The looping continues until the hot key is pressed.  This  is
  337.              especially  useful  for  automated demonstrations of software
  338.              products.
  339.  
  340.           o  User-Selectable Hot Key
  341.  
  342.              You pause and resume Phantom2  by  pressing  the  "hot  key".
  343.              When  Phantom2  is  in RECORD mode and you press the hot key,
  344.              the recording is paused.  A second pressing of  the  hot  key
  345.              resumes the recording.  Playback mode works similarly.
  346.  
  347.  
  348.                                     - 6 -
  349.     DIFFERENCES BETWEEN PHANTOM V1.0 AND PHANTOM2                 Page 2-2
  350.                                                              14 January 91
  351.  
  352.  
  353.              You select the hot key by using the /K switch on the  command
  354.              line.   For  example,  to set the hot key to ALT-K, you would
  355.              include this on the Phantom2 command line:  /K=ALT-K.
  356.  
  357.              The default hot key is ALT-P.
  358.  
  359.           o  Sound and Lights
  360.  
  361.              Phantom2 signals transitions between modes  (The  four  modes
  362.              are  RECORD,  PLAY,  PAUSE,  and  IDLE.) by sounding either a
  363.              rising or a falling series of  tones.   A  rising  series  of
  364.              tones  signals a change from IDLE or PAUSE to RECORD or PLAY,
  365.              while a falling series of tones signals a change to  IDLE  or
  366.              PAUSE mode.
  367.  
  368.              Keyclicks are heard while in record or playback mode.
  369.  
  370.              The current mode is displayed in a reverse-video box  in  the
  371.              upper  left  corner  of  the  screen.   The  mode display may
  372.              contain "Record", "Play", "Pause", or  "Phantom2".   Phantom2
  373.              is displayed when Phantom2 is in IDLE mode.
  374.  
  375.              You can disable sounds by including  the  /S  switch  on  the
  376.              Phantom2  command  line,  and  disable  the  mode  display by
  377.              including the /M switch.
  378.  
  379.           o  Pop-Up Phantom2 Control Panel
  380.  
  381.              Pressing the hot key twice in rapid succession  triggers  the
  382.              display  of  the  Phantom2  control  panel.  From the control
  383.              panel you can begin recording or playback, close a  recording
  384.              file,  enable  or  disable  sounds  and  the mode display, or
  385.              change the recording file  name.   Pressing  ESC  erases  the
  386.              control panel.
  387.  
  388.           o  Memory Residence (TSR)
  389.  
  390.              The /I  command  line  switch  installs  Phantom2  as  a  TSR
  391.              (Terminate  and  Stay Resident) program, eliminating the need
  392.              to  spawn  a  new   command   shell   and   reducing   memory
  393.              requirements.    Once  resident,  Phantom2  is  activated  by
  394.              pressing the hot key twice in succession to trigger  Phantom2
  395.              control  panel,  or  by  issuing Phantom2 commands at the DOS
  396.              prompt.
  397.  
  398.              When  Phantom2  is  resident  in  memory,  you  can  begin  a
  399.              recording  or playback while a program is in progress, rather
  400.              than only at the DOS prompt.
  401.  
  402.  
  403.  
  404.  
  405.  
  406.                                     - 7 -
  407.     DIFFERENCES BETWEEN PHANTOM V1.0 AND PHANTOM2                 Page 2-3
  408.                                                              14 January 91
  409.  
  410.  
  411.              Once Phantom2 is resident in memory, Phantom2 commands  typed
  412.              at  the DOS prompt are passed to the memory-resident Phantom2
  413.              for execution, and do not spawn a new command shell.
  414.  
  415.           o  Editing of Recording Files
  416.  
  417.              The pair of programs PTM2TXT and TXT2PTM  extract  data  from
  418.              Phantom2  recording  files  and place it into a text file for
  419.              editing, and then re-create a Phantom2  recording  file  from
  420.              the   modified   text  file.   This  allows  you  to  prepare
  421.              recordings  for  playback  without  actually  executing   the
  422.              commands  and to correct errors or make changes to recordings
  423.              you have made.
  424.  
  425.           o  Parameter Substitution
  426.  
  427.              Special  Phantom2  directives  which  you  can  add  to  your
  428.              recording   files  allow  you  to  pass  parameters  to  your
  429.              recording  file  at  playback  time,  often   making   single
  430.              recording  do  the  work  of  several.   This  is  similar to
  431.              MS-DOS's batch parameter substitution.
  432.  
  433.           o  Programmed Pauses
  434.  
  435.              You can add automatic pauses  to  your  recordings  to  allow
  436.              users to enter data or for discussion during a demonstration.
  437.              Programmed pauses may have a timeout assigned to them.   When
  438.              the  timeout  period  has  passed  with  no  input  from  the
  439.              keyboard, the pause is automatically ended, and the  playback
  440.              continues.
  441.  
  442.           o  Programmed Pop-up Displays
  443.  
  444.              You can add pop-up displays  to  your  recordings  to  inform
  445.              watchers  of the playback what is happening.  Text you supply
  446.              is displayed in a pop-up window, and the playback  is  paused
  447.              for  a timeout period which you may specify or until a key is
  448.              depressed on the keyboard.
  449.  
  450.              An unlimited number of pop-up displays may added to  Phantom2
  451.              recordings.
  452.  
  453.           o  Programmed Pop-up Menus
  454.  
  455.              Pop-up menus can be added to your recordings to  allow  users
  456.              to  direct  the course of the playback.  Menu text you supply
  457.              is displayed to the user in a pop-up window.  When  the  user
  458.              selects  a menu item, the playback is resumed at the point in
  459.              the recording which you have associated with that menu item.
  460.  
  461.  
  462.  
  463.  
  464.                                     - 8 -
  465.     DIFFERENCES BETWEEN PHANTOM V1.0 AND PHANTOM2                 Page 2-4
  466.                                                              14 January 91
  467.  
  468.  
  469.              If the user does not respond  within  a  timeout  period  you
  470.              specify,  the  next  menu  item  is  chosen, and the playback
  471.              resumes.  Thus, if the user does nothing, each menu  item  is
  472.              selected in turn automatically.
  473.  
  474.              An unlimited number of pop-up menus  may  added  to  Phantom2
  475.              recordings.
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.                                     - 9 -
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.                                   CHAPTER 3
  536.  
  537.                                 USING PHANTOM2
  538.  
  539.  
  540.  
  541.     3.1  PHANTOM2'S COMMAND LINE
  542.  
  543.     Phantom2 accepts the following command line switches:
  544.  
  545.              /P Playback
  546.  
  547.              /R Record
  548.  
  549.              /Q Quick Playback
  550.  
  551.              /L Looping Playback
  552.  
  553.              /K Hot Key Selection
  554.  
  555.              /S Disable Sounds
  556.  
  557.              /M Disable Mode Display
  558.  
  559.              /I Install as a Memory Resident Program
  560.  
  561.              /U Un-install Phantom2 from memory
  562.  
  563.  
  564.     Here's an example of a Phantom2 command to begin recording and  create
  565.     the file RECORDNG.PTM:
  566.  
  567.                    C> PHANTOM2 /R RECORDNG.PTM
  568.  
  569.  
  570.     Here's the command to play back those keystrokes:
  571.  
  572.                    C> PHANTOM2 /P RECORDNG.PTM
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.                                     - 10 -
  581.     USING PHANTOM2                                                Page 3-2
  582.     RECORDING AND PLAYING BACK                               14 January 91
  583.  
  584.  
  585.     3.2  RECORDING AND PLAYING BACK
  586.  
  587.     Phantom2  normally  creates  a  new  command  shell  when  you   start
  588.     recording.   Phantom2  will  record everything you type until you exit
  589.     the shell by typing EXIT at the DOS command prompt.  Here's an example
  590.     of recording a DIR command followed by a playback of the recording:
  591.  
  592.         Record the keystrokes:
  593.  
  594.             C> PHANTOM2 /R RECORDNG.PTM
  595.             Phantom2 V1.1 #123456  Copyright (c) 1991...blah...blah...
  596.  
  597.             Press ALT-P to pause or resume recording.
  598.             Press ALT-P twice in succession to activate the control panel.
  599.             Type EXIT at the DOS prompt when done.
  600.  
  601.  
  602.             C> DIR
  603.  
  604.             ...blah blah blah...
  605.  
  606.             C> EXIT
  607.             Phantom2 terminated.
  608.  
  609.  
  610.  
  611.         Now play them back:
  612.  
  613.             C> PHANTOM2 /P RECORDING.PTM
  614.             Phantom2 V1.1 #123456  Copyright (c) 1991...blah...blah...
  615.  
  616.             Press ALT-P to pause or resume playback.
  617.             Press ALT-P twice in succession to activate the control panel.
  618.             Type EXIT at the DOS prompt when done.
  619.  
  620.  
  621.             C> DIR
  622.  
  623.             ...blah blah blah...
  624.  
  625.             C> EXIT
  626.             Phantom2 terminated.
  627.  
  628.             C>
  629.  
  630.  
  631.     While Phantom2 was running, it placed a small  display  in  the  upper
  632.     right  corner of the screen showing what it was doing.  In the example
  633.     above, the display showed either "Record" or "Play".  If you don't ant
  634.     the mode display, just include the /M switch on the command line, like
  635.     this:
  636.  
  637.  
  638.                                     - 11 -
  639.     USING PHANTOM2                                                Page 3-3
  640.     RECORDING AND PLAYING BACK                               14 January 91
  641.  
  642.  
  643.             C> PHANTOM2 /P /M RECORDNG.PTM
  644.  
  645.  
  646.  
  647.  
  648.     3.3  PAUSING
  649.  
  650.     If you press the hot key (ALT-P) during record or  playback,  after  a
  651.     brief  delay, Phantom2 will play a series of tones falling in pitch to
  652.     indicate its transition to PAUSE mode.  The mode display, if  enabled,
  653.     will  change  to  "Pause".  A second depression of the hot key resumes
  654.     the recording or playback, accompanied by a  series  of  rising  tones
  655.     indicating the transition out of PAUSE mode.
  656.  
  657.     While in PAUSE mode, Phantom2 "steps aside" and  lets  all  keystrokes
  658.     (except  the  hot key) flow freely to the program running.  If you are
  659.     recording, the keys you press while paused are not  recorded,  nor  is
  660.     the time which passes while in PAUSE mode recorded.
  661.  
  662.     You can disable the sounds by including the /S switch on the  Phantom2
  663.     command line, like this:
  664.  
  665.             C> PHANTOM2 /R /S RECORDNG.PTM
  666.  
  667.  
  668.  
  669.  
  670.     3.4  QUICK PLAYBACK
  671.  
  672.     Phantom2 normally plays back recordings at the  same  speed  at  which
  673.     they were recorded.  The /Q switch forces Phantom2 to playback as fast
  674.     as possible.  Many programs have no problem with this.  Some  programs
  675.     however,  "eat"  characters  typed while they are busy, and will cause
  676.     the recording to end prematurely.  PRODIGY is an example of a  program
  677.     which  does  this.  To automate a PRODIGY session, timed playback is a
  678.     requirement.
  679.  
  680.     You can alter the intervals between individual keystrokes to speed  up
  681.     some  sections  of  a  recording  and  slow down others by editing the
  682.     recording file.  See the section below on editing Phantom2 recordings.
  683.  
  684.  
  685.  
  686.     3.5  LOOPING PLAYBACK
  687.  
  688.     If you supply the /L switch on the command line, Phantom2 will  rewind
  689.     and  play  the same recording file over and over until you pause it by
  690.     pressing the hot key.  If Phantom2 is memory-resident (see below), you
  691.     must  close  the  recording  file to avoid the continuation of looping
  692.     when you press the hot key again.  If Phantom2 is not memory-resident,
  693.     then you must type EXIT at the DOS prompt.
  694.  
  695.  
  696.                                     - 12 -
  697.     USING PHANTOM2                                                Page 3-4
  698.     LOOPING PLAYBACK                                         14 January 91
  699.  
  700.  
  701.     Looping can be a valuable tool in continuously-running  demonstrations
  702.     or in stress-testing software systems.
  703.  
  704.  
  705.  
  706.     3.6  THE PHANTOM2 CONTROL PANEL
  707.  
  708.     If you hit the hot key twice within about a half  second,  the  pop-up
  709.     control panel is triggered, and is displayed over whatever was already
  710.     on the screen.
  711.  
  712.     Here is what the control panel looks like:
  713.  
  714.             +----------------------------------------------------+
  715.             |                      Phantom2                 V1.1 |
  716.             +----------------------------------------------------+
  717.             |                                                    |
  718.             |   +---------+ +---------+ +---------+ +--------+   |
  719.             |   |         | |         | |         | |        |   |
  720.             |   | PLAY    | | QPLAY   | | RECORD  | | CLOSE  |   |
  721.             |   |         | |         | |         | |        |   |
  722.             |   +---------+ +---------+ +---------+ +--------+   |
  723.             |                                                    |
  724.             |    Sound On     Mode Display On   Loop Mode Off    |
  725.             |                                                    |
  726.             |    Filename: RECORDNG.PTM                          |
  727.             |                                                    |
  728.             +----------------------------------------------------+
  729.  
  730.  
  731.  
  732.     You can highlight the selection of your choice using the  arrow,  tab,
  733.     or  spacebar  keys and press RETURN to execute it or you can press the
  734.     key corresponding to the first letter of your selection.
  735.  
  736.     If you press R, P, or Q, the menu is immediately erased, and  Phantom2
  737.     begins  executing your command.  CLOSE closes an open recording file -
  738.     This  is  the  only  to  close  a  recording  file  when  Phantom2  is
  739.     memory-resident.   The  Sound,  Mode Display, and Loop Mode selections
  740.     toggle the sounds, mode display, and looping on and off.
  741.  
  742.     Selecting Filename allows you to change the recording filename.   When
  743.     you have finished entering the filename, press RETURN.
  744.  
  745.     Pressing the hot key or the ESC key erases the menu without starting a
  746.     recording or playback session.
  747.  
  748.  
  749.  
  750.  
  751.  
  752.  
  753.  
  754.                                     - 13 -
  755.     USING PHANTOM2                                                Page 3-5
  756.     CHANGING THE HOT KEY                                     14 January 91
  757.  
  758.  
  759.     3.7  CHANGING THE HOT KEY
  760.  
  761.     The /K command line switch allows you to change the hot key  from  the
  762.     default ALT-P.  Here's how you would change the hot key to F10:
  763.  
  764.             C> PHANTOM2 /K=F10 /R RECORDNG.PTM
  765.  
  766.  
  767.     Here is a list of all the acceptable hot keys which  you  can  specify
  768.     with /K:
  769.             SHFT-TAB        ALT-Q           ALT-W           ALT-E
  770.             ALT-R           ALT-T           ALT-Y           ALT-U
  771.             ALT-I           ALT-O           ALT-P           ALT-A
  772.             ALT-S           ALT-D           ALT-F           ALT-G
  773.             ALT-H           ALT-J           ALT-K           ALT-L
  774.             ALT-Z           ALT-X           ALT-C           ALT-V
  775.             ALT-B           ALT-N           ALT-M           F1
  776.             F2              F3              F4              F5
  777.             F6              F7              F8              F9
  778.             F10             HOME            UP              PGUP
  779.             LEFT            RIGHT           END             DOWN
  780.             PGDWN           INSERT          DELETE          SHFT-F1
  781.             SHFT-F2         SHFT-F3         SHFT-F4         SHFT-F5
  782.             SHFT-F6         SHFT-F7         SHFT-F8         SHFT-F9
  783.             SHFT-F10        CTRL-F1         CTRL-F2         CTRL-F3
  784.             CTRL-F4         CTRL-F5         CTRL-F6         CTRL-F7
  785.             CTRL-F8         CTRL-F9         CTRL-F10        ALT-F1
  786.             ALT-F2          ALT-F3          ALT-F4          ALT-F5
  787.             ALT-F6          ALT-F7          ALT-F8          ALT-F9
  788.             ALT-F10         CTRL-LEFT       CTRL-RIGHT      CTRL-END
  789.             CTRL-PGDWN      CTRL-HOME       ALT-1           ALT-2
  790.             ALT-3           ALT-4           ALT-5           ALT-6
  791.             ALT-7           ALT-8           ALT-9           ALT-0
  792.             ALT--           ALT-=           CTRL-PGUP       CTRL-A
  793.             CTRL-B          CTRL-C          CTRL-D          CTRL-E
  794.             CTRL-F          CTRL-G          CTRL-H          CTRL-I
  795.             CTRL-J          CTRL-K          CTRL-L          CTRL-M
  796.             CTRL-N          CTRL-O          CTRL-P          CTRL-Q
  797.             CTRL-R          CTRL-S          CTRL-T          CTRL-U
  798.             CTRL-V          CTRL-W          CTRL-X          CTRL-Y
  799.             CTRL-Z          ESC
  800.  
  801.  
  802.  
  803.  
  804.     3.8  MAKING PHANTOM2 MEMORY RESIDENT
  805.  
  806.     If you include the /I switch on the command  line,  Phantom2  installs
  807.     itself as a TSR (Terminate and Stay resident) program in memory.  This
  808.     method of using Phantom2 has a number of  benefits.   Among  them  are
  809.     lower  memory  utilization because no command shell is invoked, faster
  810.  
  811.  
  812.                                     - 14 -
  813.     USING PHANTOM2                                                Page 3-6
  814.     MAKING PHANTOM2 MEMORY RESIDENT                          14 January 91
  815.  
  816.  
  817.     execution because no loading of the Phantom2 program is required,  and
  818.     beginning  and ending of recording and playback sessions while another
  819.     program is running.
  820.  
  821.     Once resident, you access Phantom2 by pressing the hot  key  twice  in
  822.     succession to trigger the pop-up menu, or by issuing Phantom2 commands
  823.     at the DOS prompt.
  824.  
  825.  
  826.  
  827.     3.9  REMOVING PHANTOM2 FROM MEMORY
  828.  
  829.     The /U switch un-installs Phantom2 from memory.  When you execute  the
  830.     PHANTOM/U command, one of two responses will be displayed:
  831.  
  832.          1.  Phantom2 un-installed.
  833.  
  834.              This means that Phantom2 was successfully un-installed.
  835.  
  836.          2.  Phantom2 disabled.  Memory not reclaimed.
  837.  
  838.              This means that Phantom2 was only disabled, and is dormant in
  839.              memory.   This  is  almost  certainly because another TSR was
  840.              loaded after Phantom2  which  intercepts  some  of  the  same
  841.              interrupts  used  by  Phantom2.   To  remove  Phantom2, first
  842.              remove any TSR's loaded after Phantom2, and then re-issue the
  843.              /U command.
  844.  
  845.              To re-enable Phantom2, simply issue another Phantom2  command
  846.              other than /U.
  847.  
  848.  
  849.  
  850.  
  851.     3.10  EDITING PHANTOM2 RECORDINGS
  852.  
  853.  
  854.                                      NOTE
  855.  
  856.             The programs TXT2PTM  and  PTM2TXT  required  to  edit
  857.             Phantom2   recordings  are  supplied  with  registered
  858.             versions of Phantom2 only.
  859.  
  860.  
  861.     The program PTM2TXT extracts information from a Phantom2 recording and
  862.     places it in a text file for editing.  Here is an example of PTM2TXT:
  863.  
  864.             C> PTM2TXT RECORDNG.PTM RECORDNG.TXT
  865.  
  866.  
  867.  
  868.  
  869.  
  870.                                     - 15 -
  871.     USING PHANTOM2                                                Page 3-7
  872.     EDITING PHANTOM2 RECORDINGS                              14 January 91
  873.  
  874.  
  875.     The output text file looks like this:
  876.  
  877.     !========================================================================
  878.     ! P2 PHANTOM V1.0
  879.     !
  880.     ! Text translation of recording file RECORDNG.PTM.
  881.     ! Translated by PTM2TXT V1.1 #123456.
  882.     !
  883.     ! Line format:
  884.     !     mm:ss.ttt keystroke   eeaa ff
  885.     !
  886.     !     mm:ss:ttt = time interval between the previous keystroke and
  887.     !                 this one.
  888.     !         mm    = minutes
  889.     !         ss    = seconds
  890.     !         ttt   = thousandths of seconds
  891.     !     ee        = extended keycode       (optional)
  892.     !     aa        = ASCII code             (optional)
  893.     !     ff        = keyboard status flags  (optional)
  894.     !
  895.     !     Comment lines (lines beginning with !) and empty lines are ignored
  896.     !     by the TXT2PTM translator.
  897.     !
  898.     !     Lines beginning with an asterisk (*) are processed by TXT2PTM
  899.     !     without timing information.  This allows you to place entire
  900.     !     commands on one line rather than one character per line. A
  901.     !     carriage return is automatically placed at the end of * lines
  902.     !     by TXT2PTM unless the last character on the line is a dollar
  903.     !     sign.  Special character expressions (e.g., <Ctrl-K>) are
  904.     !     delimited with angle brackets (<,>).
  905.     !
  906.     !     Phantom2 directives begin with a dollar sign ($).
  907.     !     Directives supported by Phantom2 V1.1 are:
  908.     !
  909.     !         $Pause      Causes an automatic switch to pause mode during
  910.     !                     playback.  The user must press the hot key to
  911.     !                     resume playback.  The $Pause directive must
  912.     !                     be placed on a line by itself.
  913.     !
  914.     !         $n          Where n is a single digit from 1 to 9 causes
  915.     !                     arguments from the command line to be substituted
  916.     !                     for the $n directive.  $1 refers to the first
  917.     !                     command line argument after the filename, $2 the
  918.     !                     second, and so on.  The $n directive may be
  919.     !                     within an asterisk line.
  920.     !
  921.     !         $BeginDisplay    See the Phantom2 documentation for
  922.     !         $EndDisplay      instructions on using these directives.
  923.     !         $BeginMenu
  924.     !         $EndMenu
  925.     !         $Title
  926.  
  927.  
  928.                                     - 16 -
  929.     USING PHANTOM2                                                Page 3-8
  930.     EDITING PHANTOM2 RECORDINGS                              14 January 91
  931.  
  932.  
  933.     !         $Goto <label>
  934.     !         $<label>:
  935.     !
  936.     !     The special characters $, <, and > must be preceded by a
  937.     !     dollar sign ($) when they are present in an asterisk line.
  938.     !     Otherwise TXT2PTM will attempt to perform special processing
  939.     !     erroneously.
  940.     !
  941.     ! The optional fields need not be entered when editing this file.
  942.     ! Values appropriate for most circumstances will be provided for
  943.     ! you by TXT2PTM.  If you include values for the optional fields,
  944.     ! Your values will override those which TXT2PTM would provide.
  945.     !
  946.     !========================================================================
  947.  
  948.     00:01.430 D            2044 60
  949.     00:00.165 I            1749 60
  950.     00:00.165 R            1352 60
  951.     00:00.605 /            352f 60
  952.     00:00.220 W            1157 60
  953.     $1
  954.     00:00.605 <CR>         1c0d 20
  955.     00:07.480 e            1265 20
  956.     00:00.000 x            2d78 20
  957.     00:00.000 i            1769 20
  958.     00:00.000 t            1474 20
  959.     00:00.000 <CR>         1c0d 20
  960.     $Pause
  961.     00:00.000 <CR>         1c0d 20
  962.  
  963.  
  964.     The above file depicts a recording of the commands "DIR/W" and "EXIT".
  965.     As you can see, the carriage return character is translated to <CR> in
  966.     the file.  Spaces are translated as <SP>.   Non-printing  and  special
  967.     characters  such  as CTRL-K are all translated in this manner.  If you
  968.     are not sure what the translation of a character might be, it is  best
  969.     to  make  a  recording containing the character and then translate the
  970.     recording with PTM2TXT to find out what the correct translation is.
  971.  
  972.     The line format is as described in the output file  shown  above.   If
  973.     you  change  a  line  in  the  file,  it  is  best, unless you clearly
  974.     understand the BIOS extended keycodes and keyboard  status  flags,  to
  975.     remove the eeaa and ff fields.  TXT2PTM will supply appropriate values
  976.     when you leave them out.  An exception to this is  when  you  want  to
  977.     create a programmed pause as described earlier.
  978.  
  979.     Some programs may require the actual  values  for  the  keyboard  scan
  980.     codes  supplied  by the BIOS when an extended keycode is not required.
  981.     In these cases, you must supply the correct values for the eeaa and ff
  982.     fields.  We have not run across such a program to date.
  983.  
  984.  
  985.  
  986.                                     - 17 -
  987.     USING PHANTOM2                                                Page 3-9
  988.     EDITING PHANTOM2 RECORDINGS                              14 January 91
  989.  
  990.  
  991.     Note that if you edit a translated Phantom2 recording files and insert
  992.     comments  and labels, then translate the text file to a recording file
  993.     and back into a text file, the  comments  and  labels  will  be  lost.
  994.     PTM2TXT will create labels required by the menu and goto directives in
  995.     the recording, but they will not be  the  labels  from  your  original
  996.     edited text file.  Goto and menu directives are discussed below.
  997.  
  998.  
  999.  
  1000.     3.10.1  PROGRAMMED PAUSES
  1001.  
  1002.     The example contains a programmed pause  directive  after  the  second
  1003.     <CR>.   Pauses  may be programmed into the recording file as described
  1004.     in the file header shown above.  Note that  programmed  pauses  (i.e.,
  1005.     pauses  which  occur  automatically  at  predetermined  points  during
  1006.     playback) may only be created by preparing an input file  for  TXT2PTM
  1007.     such as that shown above.  There is no way to create programmed pauses
  1008.     while recording.  The pause directive may be  followed  by  a  timeout
  1009.     value  expressed  in  seconds.  If the timeout period passes without a
  1010.     key being depressed, the pause is ended and playback resumes.
  1011.  
  1012.  
  1013.  
  1014.     3.10.2  SUBSTITUTION PARAMETERS
  1015.  
  1016.     The example also contains a  substitution  parameter  directive:   $1.
  1017.     This  directive  causes  the  first  parameter entered on the Phantom2
  1018.     command line after the filename to be substituted for  the  $1  during
  1019.     playback.   Up  to  nine substitution parameters ($1, $2, $3, ..., $9)
  1020.     may be used.   If  a  corresponding  command  line  parameter  is  not
  1021.     supplied  for  playback,  the  parameter  used on the last playback is
  1022.     used.  If no parameter was used on the last playback, or  if  this  is
  1023.     the  first  playback  of this Phantom2 session, nothing is substituted
  1024.     for the substitution parameter (i.e., it is as if it was not there).
  1025.  
  1026.     Multiple  substitution  parameter  directives  may  be  placed  in  an
  1027.     asterisk  line.   Otherwise,  only  a  single directive is allowed per
  1028.     line.
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.                                     - 18 -
  1045.     USING PHANTOM2                                               Page 3-10
  1046.     EDITING PHANTOM2 RECORDINGS                              14 January 91
  1047.  
  1048.  
  1049.     3.10.3  COMPRESSED MODE
  1050.  
  1051.     You may avoid typing in the time fields (mm:ss.ttt) by starting  lines
  1052.     with  an asterisk.  Lines starting with an asterisk are referred to as
  1053.     being in "compressed" mode.  When TXT2PTM  processes  lines  beginning
  1054.     with  an  asterisk,  it behaves as if each character was on a separate
  1055.     line and preceded with "00:00.000".  TXT2PTM automatically  inserts  a
  1056.     <CR>  at  the  end of each * line.  Here is the previous example above
  1057.     created using this technique:
  1058.  
  1059.     !
  1060.     ! Example of the use of * lines.
  1061.     !
  1062.  
  1063.     * DIR/W $1
  1064.     $Pause
  1065.     * EXIT
  1066.     *
  1067.  
  1068.     !
  1069.     ! End of example
  1070.     !
  1071.  
  1072.  
  1073.     You can mix compressed an non-compressed modes in the same text file.
  1074.  
  1075.     You can cause PTM2TXT to produce  compressed  mode  output  from  your
  1076.     recordings by including the /C switch on the command line like this:
  1077.  
  1078.             C> PTM2TXT /C RECORDNG.PTM RECORDNG.TXT
  1079.  
  1080.  
  1081.     Note that the switches to the PTM2TXT command must be  separated  from
  1082.     the PTM2TXT command and other switches by spaces.
  1083.  
  1084.  
  1085.  
  1086.     3.10.4  POP-UP DISPLAYS
  1087.  
  1088.     You can cause windows containing test you provide  to  pop  up  during
  1089.     playbacks  of  Phantom2 recordings.  These pop-up displays can contain
  1090.     text explaining what  the  user  is  seeing  in  a  demonstration,  or
  1091.     announce a that a certain operation is about to take place.
  1092.  
  1093.     When a pop-up display is displayed, playback is halted until the  user
  1094.     presses  any  key  or  until  a  timeout  period which you specify has
  1095.     elapsed.
  1096.  
  1097.     The text which you wish to  appear  in  a  pop-up  display  is  placed
  1098.     between  two  Phantom2 directives:  $BeginDisplay and $EndDisplay.  If
  1099.     you want a title to appear in the upper  left  border  of  the  pop-up
  1100.  
  1101.  
  1102.                                     - 19 -
  1103.     USING PHANTOM2                                               Page 3-11
  1104.     EDITING PHANTOM2 RECORDINGS                              14 January 91
  1105.  
  1106.  
  1107.     display,  you may include a $Title directive on the line following the
  1108.     $BeginDisplay directive.
  1109.  
  1110.     The $BeginDisplay directive takes the following form:
  1111.  
  1112.            $BeginDisplay row col attr timo sr
  1113.  
  1114.  
  1115.     The parameters following the directive are interpreted as follows:
  1116.  
  1117.              row - the screen row on which the top pop-up display is to be
  1118.              written.
  1119.  
  1120.              col - the screen column on which the left edge of the  pop-up
  1121.              display is to be written.
  1122.  
  1123.              attr - The display attributes to be used for display of  your
  1124.              text:
  1125.                             0 Normal
  1126.                             1 Bold
  1127.                             2 Reverse Video
  1128.                             3 Reverse Bold 
  1129.  
  1130.              timo - A timeout value in seconds.   If  the  timeout  period
  1131.              passes  without  keyboard  input,  the  display is erased and
  1132.              playback resumes.
  1133.  
  1134.              sr - The character S or R indicating whether you  wish  other
  1135.              Phantom2  displays  and  menus  which  may  be present on the
  1136.              screen to be erased  before  this  window  is  displayed.   R
  1137.              restores  the  screen  to  what  it  was  before any Phantom2
  1138.              displays or menus were popped-up.  S saves the screen  as  it
  1139.              is  and  causes  the  new display to be painted over anything
  1140.              currently shown on the screen.
  1141.  
  1142.              Phantom2  pop-up  displays  are  automatically  erased   when
  1143.              playback is resumed.
  1144.  
  1145.  
  1146.     The text you wish to appear in the pop-up display  is  placed  between
  1147.     the $BeginDisplay and $EndDisplay directives.
  1148.  
  1149.     Here is an example of the directives used to create a pop-up display:
  1150.  
  1151.             !
  1152.             ! Create a display at row 5, column 20, reverse video, 2-minute
  1153.             ! timeout and erase any currently displayed pop-ups.
  1154.             !
  1155.             $BeginDisplay 5 20 2 120 R
  1156.             $Title Sample Pop-Up Display
  1157.  
  1158.  
  1159.  
  1160.                                     - 20 -
  1161.     USING PHANTOM2                                               Page 3-12
  1162.     EDITING PHANTOM2 RECORDINGS                              14 January 91
  1163.  
  1164.  
  1165.             This is just a simple example of a
  1166.                  Phantom2 pop-up display.
  1167.  
  1168.                (Press any key to continue.)
  1169.             $EndDisplay
  1170.  
  1171.  
  1172.     Here's how the above pop-up display would appear on the screen (at row
  1173.     5, column 20):
  1174.  
  1175.             +--Sample Pop-Up Display---------------+
  1176.             |                                      |
  1177.             |  This is just a simple example of a  |
  1178.             |       Phantom2 pop-up display.       |
  1179.             |                                      |
  1180.             |     (Press any key to continue.      |
  1181.             +--------------------------------------+
  1182.  
  1183.  
  1184.     Note that when you specify the row and  column  for  the  display  you
  1185.     should  take  into  account  that Phantom2 will add 3 columns-worth of
  1186.     border to each line and an extra line at the top and  bottom  for  the
  1187.     border.
  1188.  
  1189.  
  1190.  
  1191.     3.10.5  LABELS AND THE $GOTO DIRECTIVE
  1192.  
  1193.     You can cause playback to transfer from one place in a recording  file
  1194.     to  another  by  using the $Goto directive.  The $Goto directive has a
  1195.     single parameter:  the label of the location from which playback is to
  1196.     continue.  Labels in Phantom2 recording files take the form
  1197.  
  1198.             $<text>:
  1199.  
  1200.  
  1201.     where <test> is any printable text string not starting  with  a  digit
  1202.     and not containing spaces or tabs.
  1203.  
  1204.     Here is an example of a recording which continually clears the  screen
  1205.     and the displays the current directory:
  1206.  
  1207.             !
  1208.             ! Endless loop directory
  1209.             !
  1210.             $Loop:
  1211.             * CLS
  1212.             * DIR /W
  1213.             $Goto Loop
  1214.  
  1215.  
  1216.  
  1217.  
  1218.                                     - 21 -
  1219.     USING PHANTOM2                                               Page 3-13
  1220.     EDITING PHANTOM2 RECORDINGS                              14 January 91
  1221.  
  1222.  
  1223.     The $Goto is most useful for returning to  a  pop-up  menu  after  the
  1224.     actions  requested  by  the user have been carried out.  (Pop-up menus
  1225.     are described in the next section.)
  1226.  
  1227.  
  1228.  
  1229.     3.10.6  POP-UP MENUS
  1230.  
  1231.     You can cause menus to pop up during playbacks of Phantom2 recordings.
  1232.     These  pop-up menus can contain text and items from which the user may
  1233.     choose.  Once an item is selected, playback resumes at  the  place  in
  1234.     the recording file which is associated with that menu selection.
  1235.  
  1236.     When a pop-up menu is displayed, playback is  halted  until  the  user
  1237.     selects  an  item  or  until  a  timeout  period which you specify has
  1238.     elapsed.
  1239.  
  1240.     The text and selection items which you wish to appear in a pop-up menu
  1241.     are  placed between two Phantom2 directives:  $BeginMenu and $EndMenu.
  1242.     If you want a title to appear in the upper left border of  the  pop-up
  1243.     menu,  you  may  include  a $Title directive on the line following the
  1244.     $BeginMenu directive.
  1245.  
  1246.     The $BeginMenu directive takes the following form:
  1247.  
  1248.            $BeginMenu row col attr timo sr
  1249.  
  1250.  
  1251.     The parameters following the directive are interpreted as follows:
  1252.  
  1253.              row - the screen row on which the top pop-up menu  is  to  be
  1254.              written.
  1255.  
  1256.              col - the screen column on which the left edge of the  pop-up
  1257.              menu is to be written.
  1258.  
  1259.              attr - The display attributes to be used for display of  your
  1260.              text:
  1261.                             0 Normal
  1262.                             1 Bold
  1263.                             2 Reverse Video
  1264.                             3 Reverse Bold 
  1265.  
  1266.              timo - A timeout value in seconds.   If  the  timeout  period
  1267.              passes  without  keyboard  input,  the  display is erased and
  1268.              playback resumes.
  1269.  
  1270.              sr - The character S or R indicating whether you  wish  other
  1271.              Phantom2  displays  and  menus  which  may  be present on the
  1272.              screen to be erased  before  this  window  is  displayed.   R
  1273.              restores  the  screen  to  what  it  was  before any Phantom2
  1274.  
  1275.  
  1276.                                     - 22 -
  1277.     USING PHANTOM2                                               Page 3-14
  1278.     EDITING PHANTOM2 RECORDINGS                              14 January 91
  1279.  
  1280.  
  1281.              displays or menus were popped-up.  S saves the screen  as  it
  1282.              is  and  causes  the  new display to be painted over anything
  1283.              currently shown on the screen.
  1284.  
  1285.              Phantom2 pop-up menus are automatically erased when  playback
  1286.              is resumed.
  1287.  
  1288.  
  1289.     Menu selection items are placed after the $BeginMenu and the  optional
  1290.     $Title  directives  and after any introductory text you wish to appear
  1291.     above the selection items in the menu window.   Menu  selection  items
  1292.     are  prefixed by $<label> where <label> is the label at which playback
  1293.     is to be resumed (or at which another display  or  menu  is  defined).
  1294.     Labels are described in the section on the $Goto directive.
  1295.  
  1296.     Here is an example of the directives used to create a pop-up menu:
  1297.  
  1298.             !
  1299.             ! Create a menu at row 5, column 20, reverse video, 10-second
  1300.             ! timeout and retain any currently displayed pop-ups.
  1301.             !
  1302.             $START:
  1303.  
  1304.             $BeginMenu 5 20 2 10 S
  1305.             $Title Sample Pop-Up Menu
  1306.  
  1307.             Choose one of the items below
  1308.             by moving the highlight bar
  1309.             with the arrow keys and pressing
  1310.             RETURN when the item you want
  1311.             is highlighted.
  1312.  
  1313.             $DIR    Directory
  1314.             $CLEAR  Clear Screen
  1315.             $QUIT   Quit
  1316.             $EndMenu
  1317.  
  1318.             $DIR:
  1319.             * dir/w
  1320.             $Goto start
  1321.  
  1322.             $CLEAR:
  1323.             * cls
  1324.             $Goto start
  1325.  
  1326.             $QUIT:
  1327.             * exit
  1328.  
  1329.  
  1330.  
  1331.  
  1332.  
  1333.  
  1334.                                     - 23 -
  1335.     USING PHANTOM2                                               Page 3-15
  1336.     EDITING PHANTOM2 RECORDINGS                              14 January 91
  1337.  
  1338.  
  1339.     Here's how the above pop-up menu would appear on the screen (at row 5,
  1340.     column 20):
  1341.  
  1342.             +--Sample Pop-Up Menu----------------+
  1343.             |                                    |
  1344.             |  Choose one of the items below     |
  1345.             |  by moving the highlight bar       |
  1346.             |  with the arrow keys and pressing  |
  1347.             |  RETURN when the item you want     |
  1348.             |  is highlighted.                   |
  1349.             |                                    |
  1350.             |  Directory                         |
  1351.             |  Clear Screen                      |
  1352.             |  Quit                              |
  1353.             +------------------------------------+
  1354.  
  1355.  
  1356.     Note that when you specify the row and column for the menu you  should
  1357.     take  into account that Phantom2 will add 3 columns-worth of border to
  1358.     each line and an extra line at the top and bottom for the border.
  1359.  
  1360.  
  1361.  
  1362.     3.10.7  ELIMINATING HELP TEXT
  1363.  
  1364.     If you don't want the detailed help header on the PTM2TXT output file,
  1365.     you  can specify the /H switch on the command line.  This will cause a
  1366.     brief header to  be  prefixed  to  the  translation  rather  than  the
  1367.     detailed  help text shown in the above example.  Including both /C and
  1368.     /H will result in the smallest possible output from PTM2TXT.  Here  is
  1369.     an example of both switches being used:
  1370.  
  1371.             C> PTM2TXT /C /H RECORDNG.PTM RECORDNG.TXT
  1372.  
  1373.     .literal
  1374.  
  1375.     Note that the switches to the PTM2TXT command must be separated from the
  1376.     PTM2TXT command and other switches by spaces.
  1377.  
  1378.     When you have finished editing, you can create a recording file using the
  1379.     TXT2PTM program like this:
  1380.  
  1381.     .literal
  1382.  
  1383.             C> TXT2PTM RECORDNG.TXT RECORDNG.PTM
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.                                     - 24 -
  1393.     USING PHANTOM2                                               Page 3-16
  1394.     PASSING PARAMETERS TO RECORDINGS ON THE COMMAND LINE     14 January 91
  1395.  
  1396.  
  1397.     3.11  PASSING PARAMETERS TO RECORDINGS ON THE COMMAND LINE
  1398.  
  1399.  
  1400.                                      NOTE
  1401.  
  1402.             The programs TXT2PTM and  PTM2TXT  required  to  enter
  1403.             substitution    parameter   directives   in   Phantom2
  1404.             recordings are supplied with  registered  versions  of
  1405.             Phantom2 only.
  1406.  
  1407.  
  1408.     If you have placed substitution parameter directives in your recording
  1409.     file  (see  the  previous  section),  you  may  pass  the values to be
  1410.     substituted for them on the command line after the filename.  Here  is
  1411.     an example passing the parameters A:, XYZ, and BOOBOO:
  1412.  
  1413.            C> PHANTOM2/Q/I/K=F1 RECORDNG.PTM A: XYZ BOOBOO
  1414.  
  1415.  
  1416.     A:  is substituted for $1, XYZ for $2, and BOOBOO for $3.
  1417.  
  1418.  
  1419.  
  1420.     3.12  WHAT'S BAD ABOUT PHANTOM2?
  1421.  
  1422.     Well, Phantom2 doesn't  have  the  capability  to  determine  if  what
  1423.     happened  when  you  recorded the keystrokes is the same thing that is
  1424.     happening when you play them back.  It's as if you had  to  type  with
  1425.     your monitor turned off.  If things go wrong, Phantom2 just goes right
  1426.     on playing back keystrokes.  As  the  saying  goes,  the  results  are
  1427.     unpredictable...
  1428.  
  1429.     To recover an aborted editing session with Phantom2, for example,  you
  1430.     should  make  sure  that  everything is as it was when you started the
  1431.     recording:  the same files with the same contents,  the  same  default
  1432.     disk and directory, and so on.
  1433.  
  1434.     Batch files, on the other hand, can check the exit status of  programs
  1435.     to  determine  if  things  are  going awry.  But, supplying input to a
  1436.     spreadsheet is not something you  do  with  batch  files.   Also,  for
  1437.     simple  repetitive  tasks,  recording  what  you  want done is usually
  1438.     easier than writing and debugging a batch file to do it.
  1439.  
  1440.     Phantom2 doesn't record mouse activity, so you have to  do  everything
  1441.     you want recorded on the keyboard.
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.                                     - 25 -
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463.                                   CHAPTER 4
  1464.  
  1465.                         PHANTOM2 TECHNICAL INFORMATION
  1466.  
  1467.  
  1468.  
  1469.     4.1  DOS VERSION REQUIREMENTS
  1470.  
  1471.     PHANTOM uses features first made available in MS-DOS  V3.0,  and  will
  1472.     probably not execute properly on prior versions of MS-DOS.
  1473.  
  1474.  
  1475.  
  1476.     4.2  CALLING PHANTOM2 FROM A USER PROGRAM
  1477.  
  1478.     You can invoke  Phantom2  functions  from  a  program  using  Int  2fh
  1479.     function  e1h  (passed  in  register  AH).  The following subfunctions
  1480.     (passed in register AL) are supported:
  1481.  
  1482.           o  00 - Installation check.
  1483.  
  1484.               .  AX = 0001 on return if Phantom2 is resident in memory.
  1485.  
  1486.               .  DS:SI =  address  of  null  terminated  hot-key  name  in
  1487.                  resident Phantom2
  1488.  
  1489.               .  DS:DI = address of null terminated recording file name in
  1490.                  resident Phantom2
  1491.  
  1492.  
  1493.           o  01 - Function request
  1494.  
  1495.               .  Call with BX = function mask, CX  =  INT  16  function  0
  1496.                  return   code   for   the  hotkey,  DS:DX  =  address  of
  1497.                  null-terminated filespec.
  1498.  
  1499.               .  Function mask bit  definitions:   0  record,  1  play,  2
  1500.                  QuickPlay, 3 Loop, 4 Mode Display Toggle, 5 Sound Toggle,
  1501.                  6 Set Hotkey, 7 Set Filespec
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.                                     - 26 -
  1509.     PHANTOM2 TECHNICAL INFORMATION                                Page 4-2
  1510.     CALLING PHANTOM2 FROM A USER PROGRAM                     14 January 91
  1511.  
  1512.  
  1513.           o  02 - Uninstall request.
  1514.  
  1515.               .  AX  =  0001  on  return  if   the   de-installation   was
  1516.                  successful.
  1517.  
  1518.               .  AX = 0002 on return if Phantom2 is  not  installed  as  a
  1519.                  TSR, but has merely spawned a command shell
  1520.  
  1521.               .  AX = ffffh on return if Phantom2 was only  disabled,  and
  1522.                  is now dormant in memory.
  1523.  
  1524.  
  1525.  
  1526.  
  1527.  
  1528.     4.3  HOW DOES IT WORK?
  1529.  
  1530.     Phantom2 intercepts the BIOS keyboard interrupt  and  the  PC's  clock
  1531.     interrupt,  and  in  record  mode,  copies any keystrokes that it sees
  1532.     along with the number of  clock  ticks  that  have  accumulated  since
  1533.     startup.   On playback, Phantom2 substitutes its own interrupt handler
  1534.     for the BIOS keyboard interrupt routine and feeds  back  the  recorded
  1535.     keystrokes  at  the  appropriate  times.   If  Phantom2  runs  out  of
  1536.     keystrokes to play back, it passes any requests for keyboard input  on
  1537.     to the BIOS keyboard interrupt routine.
  1538.  
  1539.  
  1540.  
  1541.  
  1542.  
  1543.  
  1544.  
  1545.  
  1546.  
  1547.  
  1548.  
  1549.  
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.                                     - 27 -
  1567.